<template>
  <div id="app">
  
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted(){
    var url = window.location.href;
    var str = url.split('?token=')[1]

    if(str&&str.includes('#/')){
        str = str.slice(0, -2);
         this.$store.commit('setToken',str)
    }else{
      window.location.href = 'https://wechat.hangzhou.com.cn/fiveWater/auth_code'
    }
  },

}
</script>

<style>
#app,html,body{
   margin: 0;
   padding: 0;
   max-width: 450px;
   margin: 0 auto;
}

</style>
